package com.chis.dubbo;

import com.alibaba.fastjson.JSON;
import com.chis.dubbo.service.ITest2;
import com.chis.dubbo.service.TestBean;
import org.springframework.context.support.ClassPathXmlApplicationContext;

import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;

/**
 * @author wlj
 * @version 2019年03月14日
 * @Description
 * @Company zwx
 */
public class Consumer2 {

    public static void main(String[] args) {
        try {
            ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext(new String[]{"consumer2.xml"});
            ITest2 test = (ITest2) context.getBean("test2");
            TestBean testBean = test.test();
            String str = JSON.toJSONString(testBean);
            System.out.println(str);

        } catch (Exception e) {
            e.printStackTrace();
        }


    }
}
